export const STRING_TYPE = 'String';
export const NUMBER_TYPE = 'Number';
export const ARRAY_TYPE = 'Array';
export const OBJECT_TYPE = 'Object';
export const BOOLEAN_TYPE = 'Boolean';
export const ANY_TYPE = 'Any';

export const SCHEMA_TYPE = [STRING_TYPE, NUMBER_TYPE, ARRAY_TYPE, OBJECT_TYPE, BOOLEAN_TYPE, ANY_TYPE];

export const RULES = {
  required: {
    type: 'required',
    message: '不能为空',
  },
  length: {
    type: 'length',
  },
  regex: {
    type: 'regex',
  },
  enums: {
    type: 'enums',
  },
  formatter: {
    type: 'formatter',
  },
};

export const FORMAT = [
  { name: 'phone', title: '手机/电话' },
  { name: 'email', title: '邮箱' },
];
